<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .father{
            overflow: hidden;
            width: 400px;
            height: 400px;
            background-color: pink;
            margin: 100px auto;
        }
        .son{
            width: 200px;
            height: 200px;
            line-height: 200px;
            margin: 100px;
            text-align: center;
            background-color: skyblue;
        }
    </style>
</head>
<body>
    <div class="father">
        <div class="son">son</div>
    </div>
    <script>
        var son = document.querySelector('.son');
        son.addEventListener('click', function(e) {
            alert('son');
            e.stopPropagation(); //停止传播，不再冒泡 标准
           // e.cancelBubble = true; //非标准，兼容IE679
        })
        var father = document.querySelector('.father');
        father.addEventListener('click', function(e) {
            alert('father');
        })
    </script>
</body>
</html>